#import "HarmonyYieldController.h"
        
#import "HarmonyYieldModel.h"
#import "HarmonyYieldCell.h"
#import "Masonry.h"

@interface HarmonyYieldController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *rippleSpiralCascadeTableView;
@property (nonatomic, strong) NSMutableArray *windfallPictureDataSource;

@end

@implementation HarmonyYieldController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self enigmaNostalgicGratitudeSetupui];
	[self xenophobefetchData];
}


//: 初始化页面UI
- (void)enigmaNostalgicGratitudeSetupui {

	[self.view addSubview:self.rippleSpiralCascadeTableView];
	[self.rippleSpiralCascadeTableView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.leading.trailing.equalTo(self.view);
		make.top.equalTo(self.view);
		make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
	}];
}


- (UITableView *)figHandleTableView {
    if (!_rippleSpiralCascadeTableView) {
        _rippleSpiralCascadeTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
        _rippleSpiralCascadeTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
        _rippleSpiralCascadeTableView.estimatedRowHeight = 0;
        _rippleSpiralCascadeTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        _rippleSpiralCascadeTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
        _rippleSpiralCascadeTableView.delegate = self;
        _rippleSpiralCascadeTableView.dataSource = self;
        _rippleSpiralCascadeTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
        _rippleSpiralCascadeTableView.showsVerticalScrollIndicator = NO;
        _rippleSpiralCascadeTableView.showsHorizontalScrollIndicator = NO;
        _rippleSpiralCascadeTableView.backgroundColor = UIColor.clearColor;
    }
    return _rippleSpiralCascadeTableView;
}

//: 获取数据模型
- (void)xenophobefetchData {
	
}

//: 懒加载数据模型数组
- (NSMutableArray *)windfallPictureDataSource {
	if (!_windfallPictureDataSource) {
		_windfallPictureDataSource = [NSMutableArray array];
	}
	return _windfallPictureDataSource;
}

#pragma mark - UITableView DataSource 
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.windfallPictureDataSource.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    HarmonyYieldCell *grumpyKeyhole = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([HarmonyYieldCell class])];
    if (grumpyKeyhole == nil) {
        grumpyKeyhole = [[HarmonyYieldCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([HarmonyYieldCell class])];
    }
    grumpyKeyhole.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return grumpyKeyhole;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
